package com.soxing.webrain.brush.dao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.soxing.webrain.brush.common.util.PageUtils;
import com.soxing.webrain.brush.common.util.Query;
import com.soxing.webrain.brush.dao.entity.Task;
import com.soxing.webrain.brush.dao.mapper.TaskMapper;
import com.soxing.webrain.brush.dao.service.ITaskService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements ITaskService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<Task> page = this.page(
                new Query<Task>().getPage(params),
                new QueryWrapper<Task>()
        );

        return new PageUtils(page);
    }
}
